<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class GroupClass extends Model
{
    //套餐表
    protected $table = 'group_class';

    //关联详情
    public function group_class_info(){
        return $this->hasMany(GroupClassInfo::class,'group_class_id','id');
    }

    //多对多
    public function geuop_class_base(){
        return $this->belongsToMany(ClassBaseInfo::class, 'group_class_info',
            'group_class_id', 'class_base_info_id');
    }
}
